package com.my.chapter15;


import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class Test {
    public static void main(String[] args) {
        List<? super Fruit> flist = new ArrayList<Fruit>();
        flist.add(new Apple());
        flist.add(new Fruit());
        Object f = flist.get(0);
        System.out.println(f);
        System.out.println(flist.contains(new Apple()));
        System.out.println(flist.indexOf(new Apple()));
    }
}

class Fruit{}
class Apple extends Fruit{}





